Skip to main content

Functions on data

ArangoDB provides a wide variety of built-in functions. The official documentation on supported functions can be found here

Example functions

ISO Date

  1. Return all distinct dates for flights in this dataset

    for flight in flights
    return distinct date_iso8601(flight.Year,flight.Month,flight.Day)

Geo Spatial Functions

  1. Lets get all the coordinates of airports in NY and CA

    for airport in airports
    filter airport.state == "CA" or airport.state=="NY"
    return geo_point(airport.long, airport.lat)
  2. The results in addition to JSON and Table formats, the data can be displayed in GeoSpatial format on a map GeoPoint results

Phonetic query

  1. Lets find some airports which sound like "Wasingtow"
  2. The following query helps accomplish the goal
    for airport IN airports 
    filter soundex(airport.name) == SOUNDEX("Wasingtow")
    return airport.name
  3. The expected results are as follows:
    [
    "Washington Island",
    "Washington County",
    "Washington Municipal",
    "Washington Dulles International",
    "Washington-Wilkes County",
    "Washington Memorial"
    ]
 
Help us improve

Anything unclear or buggy in this tutorial? Provide Feedback